//package com.aisile.rabbitmq.listener;
//
////import com.aisile.rabbitmq.config.RabbitMQConfigv2;
//import com.aisile.rabbitmq.config.RabbitMQConfigv3;
//import com.rabbitmq.client.Channel;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//import java.io.UnsupportedEncodingException;
//
///**
// * @Auther:yry
// * @Date:2024/1/2 0002
// * @VERSON:1.0
// */
//@Component
//public class CumMQListener {
//
//    @Value("${server.port}")
//    private String post;
//
//
//    @RabbitListener(queues = RabbitMQConfigv3.TEST_QUEUE1)
//    public void msg1(String msg){
//        //        AuthDto authDto = new AuthDto();
////        authDto.setId(apUserRealname.getId());
////        this.autoUpdateStatusById(authDto);
//        System.out.println(post+"queue1");
//        System.out.println("------------------------------"+msg);
//    }
//
//    @RabbitListener(queues = RabbitMQConfigv3.TEST_QUEUE2)
//    public void msg2(Message msg, Channel channel) throws IOException {
//       try {
//           System.out.println(post+"queue2");
//           String str = new String(msg.getBody(),"utf-8");
//           System.out.println(str);
//           channel.basicAck(msg.getMessageProperties().getDeliveryTag(),true);
//       }catch (Exception e) {
//
//           channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
//       }
//
//    }
//
//}
